<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
   <head>
    	<title></title>   
		<s:include value="../common/source.jsp"></s:include>	
		<script src="js/member.js"></script>
		
  </head>
  <body>
	<jsp:include page="sendEmail.jsp"></jsp:include>
     <div class="body"> 
        
          <div class="content ui-sortable">
          <div class="list">  项目列表</div>
          	<br/>
   <!-- 打印报表 -->
   
   <s:if test="flag!=4">
   
    <div class="load0">
        <form action="admin/ProjectFileCreateAction.action" method="post">
        <input type="hidden" name="name" value=${name }>
        <input type="hidden" name="flag" value=${flag }>
        <input type="hidden" name="date1" value=${date11 }>
        <input type="hidden" name="date2" value=${date22 }>
        <input type="submit" class="sui-btn btn-primary" value="下载Excel">
        </form> 
         </div>
         
         </s:if>
         <!-- *********************超级检索的Excel下载********************** -->
         
         <s:if test="flag==4">
         
           <div class="load0">
          <a href="admin/ProjectCreateAction.action
			?project.name=<s:property value="project.name"/>
			&project.level=<s:property value="project.level"/>
			&project.finishDate=<s:property value="project.finishDate"/>
			&project.beginDate=<s:property value="project.beginDate"/>
			&project.source=<s:property value="project.source"/>
			&project.funds=<s:property value="project.funds"/>
			&project.arriveFunds=<s:property value="project.arriveFunds"/>
			&project.leader=<s:property value="project.leader"/>
			&project.others=<s:property value="project.others"/>
			&project.class_=<s:property value="project.class_"/>
			&project.number=<s:property value="project.number"/>
			&project.kind=<s:property value="project.kind"/>
			&project.progress=<s:property value="project.progress"/>
			&direction=<s:property value="direction"/>" ><input class="sui-btn btn-primary"type="button"value="下载Excel"></a>
         </div>
         </s:if>
           <s:if test="flag==4">
       <!--    <div class="load01">
            <a href="admin/PrintCountProjectAction.action
			?project.name=<s:property value="project.name"/>
			&project.level=<s:property value="project.level"/>
			&project.finishDate=<s:property value="project.finishDate"/>
			&project.beginDate=<s:property value="project.beginDate"/>
			&project.source=<s:property value="project.source"/>
			&project.funds=<s:property value="project.funds"/>
			&project.arriveFunds=<s:property value="project.arriveFunds"/>
			&project.leader=<s:property value="project.leader"/>
			&project.others=<s:property value="project.others"/>
			&project.class_=<s:property value="project.class_"/>
			&project.number=<s:property value="project.number"/>
			&project.kind=<s:property value="project.kind"/>
			&project.progress=<s:property value="project.progress"/>
			&direction=<s:property value="direction"/>" ><input class="sui-btn btn-primary"type="button"value="打印"></a>
          </div> --> 
          </s:if>
         
         <s:if test="flag!=4">
         
           <!--关键词搜索-->
            <div class="search">
            <form action="admin/ProjectNameAction.action?currentPage=1&code=0" method="post">
           
              <label class="control-label v-top">输入关键词：</label>
             <input type="text"  class="sear" name="name" > 
              <button type="submit" class="sui-btn btn-primary">搜索</button>
            </form> 
            <!--关键词搜索结束-->
          </div>   
    <div class="year">       
            <form action="admin/ProjectDateAction.action?currentPage=1" method="post">
         <span class="control-group">
          <label class="control-label v-top">开始年份：</label>
          <span class="controls">
           <input type="text" class="sear"data-toggle="datepicker" value="" name="date1">
          </span>
        </span>
            <span class="control-group">
          <label class="control-label v-top" >结束年份：</label>
          <span class="controls">
           <input type="text" class="sear"data-toggle="datepicker" value="" name="date2">
          </span>
        </span> <button type="submit" class="sui-btn btn-primary">搜索</button>
        </form> 
        </div>
         <div class="nopath">
           <form action="admin/SearchProjectUncheckAction.action?currentPage=1" method="post">
           <button type="submit" class="sui-btn btn-primary">未审核项</button>
           </form>
           </div>
           
          </s:if>
          
           <br>	
             <hr style="background-color:#cfe1f9;height:1px;"/> 
    <table class="sui-table table-primary table-sideheader ta-width">
          <thead>
            <tr>
              <th style="width:4%;text-align:center">序号</th>
              <th style="width:24%">项目名称</th>       
              <th style="width:7%">类型</th>                  
              <th style="width:9%">来源</th>
              <th style="width:6%">经费(万)</th>
               <th style="width:6%">负责人</th>
                <th style="width:7%">通信人员</th>       
              <th style="width:8%">开始日期</th>
              <th style="width:8%">截止日期</th>
              <th style="width:8%">审核状态</th>
              <s:if test="flag!=4">
              <th style="width:5%">留言</th>
              </s:if>
              <th style="width:4%">下载</th>
              <th style="width:4%">流程</th>
            </tr>
          </thead>
          <tbody>
          <s:iterator value="projects">
            <tr>
              <td style="text-align:center"></td>
              <td><a href="admin/ReMendProjectAction.action?project.proId=<s:property value="proId"/>"><s:property value="name"/></a></td>
              <td>
              <s:if test="kind==0">
              <s:if test="class_==0">重大项目</s:if>
              <s:elseif test="class_==1">一般项目</s:elseif>
              <s:elseif test="class_==2">面上项目</s:elseif>
              <s:elseif test="class_==3">青年项目</s:elseif>
              <s:elseif test="class_==4">国际（地区）合作项目</s:elseif>
              <s:elseif test="class_==5">重大研究项目</s:elseif>
              <s:elseif test="class_==6">子课题</s:elseif>
              </s:if>
              <s:elseif test="kind==1">
              <s:if test="class_==0">100万以上</s:if>
              <s:elseif test="class_==1">50万以上</s:elseif>
              <s:elseif test="class_==2">50万以下</s:elseif>
              </s:elseif>
              </td>
              <td><s:property value="source"/></td>
              <td><s:property value="funds"/></td>
              <td><s:property value="leader"/></td>
              <td><s:property value="communicate"/></td>
              <td><s:date name="beginDate"  format="yyyy-MM-dd" /></td>
              <td><s:date name="finishDate"  format="yyyy-MM-dd" /></td>
               <!-- ********************************管理员审核****************************** -->
              <td>
		              <div class="control-group">
						<div class="controls ">
				            <span class="sui-dropdown dropdown-bordered select">
				              <span class="dropdown-inner">
				                <a id="drop4" role="button" data-toggle="dropdown" href="#" class="dropdown-toggle">
				                  <input value="hz" class="input-large" name="city" type="hidden"><i class="caret">
				                  </i>
				                  <span>
				                  <s:if test="state==4"><span  class="yellowColor">未审核</span></s:if>
				                  <s:elseif test="state==5"><span  class="greenColor">已审核</span></s:elseif>
				                  </span>
				                </a>
				                
				                <s:if test="flag!=4">
				                
				                <ul id="menu4" role="menu" aria-labelledby="drop4" class="sui-dropdown-menu">				                
				                  <li role="presentation">
				                  <s:if test="state==4">
				                  <a href="admin/ProjectCheckedAction.action?project.proId=<s:property value="proId"/>&currentPage=1"><span  class="greenColor">通过</span></a>
				                  </s:if>
				                  </li>	
				                  <s:if test="state==4||state==5">			                  
								  <li role="presentation" class="divider"><>
				                  <li role="presentation">
				                  <a href="admin/ProjectCheckFailAction.action?project1.proId=<s:property value="proId"/>&currentPage=1"><span  class="redColor">不通过</span></a>
				                  </li>
				                  </s:if>
				                </ul>
				                
				                </s:if>
				                
				              </span>
				            </span>
				          </div>
					  </div> 				   
              </td>
              <s:if test="flag!=4">
              <td><input type="submit" class="sui-btn btn-primary" value="留言" onclick="showPopup('<s:property value="teaId"/>')"/></td>
              </s:if>
              <td>
              <s:if test="upload==''||upload==null">
             <font color="#cccccc">下载</font>
              </s:if>
              <s:else>
               <a href="admin/FruitsFileDownloadAction.action?nameCom=<s:property value="upload"/>">下载</a>
              </s:else>
              </td>   
               <td><a href="teacher/flowPro.action?projectId=<s:property value="proId"/>">查看</a></td>
              </tr>
          </s:iterator>
          </tbody>
        </table>
        
        	       <!--**************************** 开始进行分页显示 *******************************-->
        	      
        <div align="center" style="font-size: 12px">
         <!-- **************************************全部的分页****************** -->
                        <s:if test="flag==0">
							<s:if test="currentPage!=1">
								<a href="admin/ProjectAction.action?currentPage=1">首页</a> | 
								<a href="admin/ProjectAction.action?currentPage=<s:property value="currentPage-1"/>">上一页</a>
							</s:if>
							<s:if test="currentPage!=endPage&&endPage!=0">
								<a href="admin/ProjectAction.action?currentPage=<s:property value="currentPage+1"/>">下一页</a> | 
								<a href="admin/ProjectAction.action?currentPage=<s:property value="endPage"/>">尾页</a>
							</s:if>
							<s:if test="currentPage==1&&counts==0">
							<div>对不起，你所查找的数据条数为0！</div>
							</s:if>
		                </s:if>

		  <!-- **************************************日期的分页****************** -->
                        <s:elseif test="flag==1">
							<s:if test="currentPage!=1">
								<a href="admin/ProjectDateAction.action?currentPage=1&date1=<s:property value="date1"/>&date2=<s:property value="date2"/>">首页</a> | 
								<a href="admin/ProjectDateAction.action?currentPage=<s:property value="currentPage-1"/>&date1=<s:property value="date1"/>&date2=<s:property value="date2"/>">上一页</a>
							</s:if>
							<s:if test="currentPage!=endPage&&endPage!=0">
								<a href="admin/ProjectDateAction.action?currentPage=<s:property value="currentPage+1"/>&date1=<s:property value="date1"/>&date2=<s:property value="date2"/>">下一页</a> | 
								<a href="admin/ProjectDateAction.action?currentPage=<s:property value="endPage"/>&date1=<s:property value="date1"/>&date2=<s:property value="date2"/>">尾页</a>
							</s:if>
							<s:if test="currentPage==1&&counts==0">
							<div>对不起，你所查找的数据条数为0！</div>
							</s:if>
		                </s:elseif>
		                
         <!-- **************************************名称的分页****************** --> 
                        <s:elseif test="flag==2">
							<s:if test="currentPage!=1">
								<a href="admin/ProjectNameAction.action?currentPage=1&name=<s:property value="name"/>&code=1">首页</a> | 
								<a href="admin/ProjectNameAction.action?currentPage=<s:property value="currentPage-1"/>&name=<s:property value="name"/>&code=1">上一页</a>
							</s:if>
							<s:if test="currentPage!=endPage&&endPage!=0">
								<a href="admin/ProjectNameAction.action?currentPage=<s:property value="currentPage+1"/>&name=<s:property value="name"/>&code=1">下一页</a> |
								<a href="admin/ProjectNameAction.action?currentPage=<s:property value="endPage"/>&name=<s:property value="name"/>&code=1">尾页</a>
							</s:if>
							<s:if test="currentPage==1&&counts==0">
							<div>对不起，你所查找的数据条数为0！</div>
							</s:if>
		                </s:elseif>
		                
		  <!-- **************************************审核类型的分页****************** --> 
                        <s:elseif test="flag==3">
							<s:if test="currentPage!=1">
								<a href="admin/SearchProjectUncheckAction.action?currentPage=1&name=<s:property value="name"/>&code=1">首页</a> | 
								<a href="admin/SearchProjectUncheckAction.action?currentPage=<s:property value="currentPage-1"/>&name=<s:property value="name"/>&code=1">上一页</a>
							</s:if>
							<s:if test="currentPage!=endPage&&endPage!=0">
								<a href="admin/SearchProjectUncheckAction.action?currentPage=<s:property value="currentPage+1"/>&name=<s:property value="name"/>&code=1">下一页</a> |
								<a href="admin/SearchProjectUncheckAction.action?currentPage=<s:property value="endPage"/>&name=<s:property value="name"/>&code=1">尾页</a>
							</s:if>
							<s:if test="currentPage==1&&counts==0">
							<div>对不起，你所查找的数据条数为0！</div>
							</s:if>
		                </s:elseif>
		                
		                
		  <!-- **************************************超级检索的分页****************** --> 
                     <s:elseif test="flag==4">
				<s:if test="currentPage!=1">
					<a href="admin/ProjectSuperAction.action
					?currentPage=1
			
					&project.name=<s:property value="project.name"/>
					&project.level=<s:property value="project.level"/>
					&project.finishDate=<s:property value="project.finishDate"/>
					&project.beginDate=<s:property value="project.beginDate"/>
					&project.source=<s:property value="project.source"/>
					&project.funds=<s:property value="project.funds"/>
					&project.arriveFunds=<s:property value="project.arriveFunds"/>
					&project.leader=<s:property value="project.leader"/>
					&project.others=<s:property value="project.others"/>
					&project.class_=<s:property value="project.class_"/>
					&project.number=<s:property value="project.number"/>
					&project.kind=<s:property value="project.kind"/>
					&project.progress=<s:property value="project.progress"/>
					
					&level=<s:property value="level"/>
					&kind=<s:property value="kind"/>
					&class_=<s:property value="class_"/>
					&finishDate=<s:property value="finishDate"/>	
					
					&direction=<s:property value="direction"/>">首页</a> | 
					
					<a href="admin/ProjectSuperAction.action
					?currentPage=<s:property value="currentPage-1"/>
					&project.name=<s:property value="project.name"/>
					&project.level=<s:property value="project.level"/>
					&project.finishDate=<s:property value="project.finishDate"/>
					&project.beginDate=<s:property value="project.beginDate"/>
					&project.source=<s:property value="project.source"/>
					&project.funds=<s:property value="project.funds"/>
					&project.arriveFunds=<s:property value="project.arriveFunds"/>
					&project.leader=<s:property value="project.leader"/>
					&project.others=<s:property value="project.others"/>
					&project.class_=<s:property value="project.class_"/>
					&project.number=<s:property value="project.number"/>
					&project.kind=<s:property value="project.kind"/>
					&project.progress=<s:property value="project.progress"/>
					
					
					&level=<s:property value="level"/>
					&kind=<s:property value="kind"/>
					&class_=<s:property value="class_"/>
					&finishDate=<s:property value="finishDate"/>	
					
					
					&direction=<s:property value="direction"/>">上一页</a>
					
				</s:if>
				<s:if test="currentPage!=endPage&&endPage!=0">
					<a href="admin/ProjectSuperAction.action
					?currentPage=<s:property value="currentPage+1"/>
					
					&project.name=<s:property value="project.name"/>
					&project.level=<s:property value="project.level"/>
					&project.finishDate=<s:property value="project.finishDate"/>
					&project.beginDate=<s:property value="project.beginDate"/>
					&project.source=<s:property value="project.source"/>
					&project.funds=<s:property value="project.funds"/>
					&project.arriveFunds=<s:property value="project.arriveFunds"/>
					&project.leader=<s:property value="project.leader"/>
					&project.others=<s:property value="project.others"/>
					&project.class_=<s:property value="project.class_"/>
					&project.number=<s:property value="project.number"/>
					&project.kind=<s:property value="project.kind"/>
					&project.progress=<s:property value="project.progress"/>
					
					
					&level=<s:property value="level"/>
					&kind=<s:property value="kind"/>
					&class_=<s:property value="class_"/>
					&finishDate=<s:property value="finishDate"/>					
					&direction=<s:property value="direction"/>">下一页</a> |
					
					<a href="admin/ProjectSuperAction.action
					?currentPage=<s:property value="endPage"/>
					
					&project.name=<s:property value="project.name"/>
					&project.level=<s:property value="project.level"/>
					&project.finishDate=<s:property value="project.finishDate"/>
					&project.beginDate=<s:property value="project.beginDate"/>
					&project.source=<s:property value="project.source"/>
					&project.funds=<s:property value="project.funds"/>
					&project.arriveFunds=<s:property value="project.arriveFunds"/>
					&project.leader=<s:property value="project.leader"/>
					&project.others=<s:property value="project.others"/>
					&project.class_=<s:property value="project.class_"/>
					&project.number=<s:property value="project.number"/>
					&project.kind=<s:property value="project.kind"/>
					&project.progress=<s:property value="project.progress"/>
					
					&level=<s:property value="level"/>
					&kind=<s:property value="kind"/>
					&class_=<s:property value="class_"/>
					&finishDate=<s:property value="finishDate"/>				
					&direction=<s:property value="direction"/>">尾页</a>
				</s:if>
				<s:if test="currentPage==1&&counts==0">
				<div>对不起，你所查找的数据条数为0！</div>
				</s:if>
               </s:elseif>

						</div>	
       
       
        
        
         <!-- ****************日期显示******************** -->
        <script type="text/javascript">

	    var d = new Date();
		var date = d.getFullYear();
		var uu=document.getElementById("menu4");
		var tt=document.getElementById("menu6");
		var aa=uu.getElementsByTagName("a");
		var bb=tt.getElementsByTagName("a");
		
		   for(var i=0; i<aa.length;i++) 
		   {
		   	aa[i].innerHTML=date;
		   	//aa[i].value=date;a
		   	aa[i].setAttribute('value', date);
		   	date--;
		   } 
		   var date = d.getFullYear();
		   for(var i=0; i<bb.length;i++) 
		   {
		   	bb[i].innerHTML=date;
		   	bb[i].setAttribute('value',date);
		   	date--;
		   	aa[i].value=date;
		   } 
        
        </script>
	</div>
	</div>
  </body>
</html>